# 使用多进程从fdtd采样
from sampleFDTD import sim_struc
import numpy as np
import matplotlib.pylab as plt
import lumapi as lum
import multiprocessing as mp


if __name__ == '__main__':
    # num_cores = mp.cpu_count()
    pool = mp.Pool(15)
    n = np.ones(15)*1000
    n = n.tolist()
    res = [pool.apply_async(sim_struc, args=('process_all_append_2 %s' % str(i), n[i], None, True)) for i in range(len(n))]
    result = [p.get() for p in res]


